import React, { Component } from "react";
import "../../styles/home/SearchBox.scss";
import { SearchOutlined } from '@ant-design/icons';
import { withRouter } from 'react-router-dom';


class SearchBox extends Component {
    // eslint-disable-next-line no-useless-constructor
    constructor(props) {
        super(props);
    }
    toSearch(){
        this.props.history.push('/search');
    }
    render() {
        return (
            <div className="searchBox" >
                {/*搜索框*/}
                <div className="search" onClick={()=>{ this.toSearch() }}>
                    <SearchOutlined style={{ color: '#ff0000', fontSize: '20px' }} />
                    <input type="text" placeholder="搜索商品" />
                </div>
                <div className="help">客服</div>
            </div>
        );
    }
}

export default withRouter(SearchBox);
